/**
 * @(#)DBConnection.java, 2013年10月28日. Copyright 2012 Yodao, Inc.
 *                                     All rights reserved. YODAO
 *                                     PROPRIETARY/CONFIDENTIAL. Use is subject
 *                                     to license terms.
 */
package com.scitc.pleasurevideo.datasql;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

/**
 * @author contradiction
 * 
 */
public class DBConnection extends SQLiteOpenHelper {

	public DBConnection(Context ctx) {
		super(ctx, DbSupport.SYSTEM_DATABASE_NAME, null,
				DbSupport.SYSTEM_DATABASE_VERSION);
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		String favoriteWords_SQL ="create table favorite_word(id bigint auto_increment,newsId int,saveTime bigint,word varchar(200),content text,primary key(id));";
		db.execSQL(favoriteWords_SQL);
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		//String addNewsChannelColumn =  "ALTER TABLE news ADD COLUMN channel varchar(50) NULL DEFAULT 'all';";
		//db.execSQL(addNewsChannelColumn);
	}
}
